type Person = {
  name: string;
  friend?: {
    name: string;
    age?: number;
  };
};

const info: Person = {
  name: "why",
  friend: {
    name: "kobe",
  },
};

// 另外一个文件中
console.log(info.name);
console.log(info.friend?.name);
// console.log(info.friend?.age);

